package com.duty.UI;

import java.util.regex.Pattern;

import com.duty.UI.R;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.text.util.Linkify;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class UpdateActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.update);
             
//        TextView updateLink = (TextView) findViewById(R.id.update_URL);     
//        Pattern pattern = Pattern.compile("canadiandutycalculator");        
//        updateLink.setText("canadiandutycalculator");     
//        Linkify.addLinks(updateLink,pattern, "http://www.canadiandutycalculator.ca");

        
        // method 3
        Button link3Btn = (Button)findViewById( R.id.link4_btn );
        link3Btn.setOnClickListener( new View.OnClickListener()
        {
		public void onClick(View v)
		{
			Uri uri = Uri.parse( "http://www.canadiandutycalculator.ca" );
			startActivity( new Intent( Intent.ACTION_VIEW, uri ) );
		}
        });

        
        
    }	
}
